<template>
    <div class="order-success">
      <van-nav-bar title="订单提交成功" left-text="返回" left-arrow @click-left="goBack" />
      <van-empty description="订单提交成功" image="success">
        <van-button round type="primary" class="bottom-button" @click="goToHome">返回首页</van-button>
      </van-empty>
    </div>
  </template>
  
  <script setup>
  import { useRouter } from 'vue-router'
  
  const router = useRouter()
  
  const goBack = () => {
    router.back()
  }
  
  const goToHome = () => {
    router.push({ name: 'home' })
  }
  </script>
  
  <style lang="less" scoped>
  .order-success {
    margin: 0.3rem;
    padding: 0.05rem 0 3rem 0;
    .bottom-button {
      width: 7rem;
      height: 2rem;
    }
  }
  </style>